package main

import "fmt"

func main() {
	//var x = map[string]string{
	//	"A": "Apple",
	//	"B": "banana",
	//	"C": "orange",
	//	"D": "Pear",
	//}

	//for key, val := range x {
	//	fmt.Println(key, val)
	//}

	//var x map[string]string

	//x = make(map[string]string)

	//x["A"] = "Apple"
	//x["B"] = "Banana"
	//x["C"] = "orange"
	//x["D"] = "pear"

	//fmt.Println(x)

	//x := make(map[string]string)

	//x["A"] = "Apple"
	//x["B"] = "banana"
	//x["c"] = "orange"

	////for key, val := range x {
	////	fmt.Println(key, val)
	////}

	//if val, ok := x["C"]; ok {
	//	fmt.Println(val)
	//}

	//x := make(map[string]string)

	//x["A"] = "Apple"
	//x["B"] = "Banana"
	//x["C"] = "Orange"

	//fmt.Println("before delete")
	//fmt.Println("length", len(x))
	//fmt.Println(x)

	//delete(x, "A")

	//fmt.Println("after delete")
	//fmt.Println("length", len(x))
	//fmt.Println(x)

	//var facebook = make(map[string]map[string]int)

	//facebook["061601"] = map[string]int{"mu": 25}
	//facebook["061602"] = map[string]int{"li": 20}
	//facebook["061603"] = map[string]int{"liang": 20}
	//facebook["061604"] = map[string]int{"yan": 18}

	//for no, stu := range facebook {
	//	fmt.Println("Student:", no)

	//	for name, age := range stu {
	//		fmt.Println("name:", name)
	//		fmt.Println("age:", age)
	//	}
	//}

	var facebook = map[string]map[string]int{
		"061601": {"li": 18},
		"061602": {"yan": 19},
		"061603": {"liang": 20},
		"061604": {"lu": 21},
	}

	for no, stu := range facebook {
		fmt.Println(no)

		for name, age := range stu {
			fmt.Println("name:", name)
			fmt.Println("age:", age)
		}
	}

}
